package com.sxkf.template.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author 杨玉龙
 * @since 2024-11-22 11:50:24
 */
@Data
@TableName("t_product_spec")
@ApiModel(value = "ProductSpec对象", description = "")
public class ProductSpec implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ID")
      @TableId("id")
    private String id;

    @ApiModelProperty("商品ID")
    @TableField("product_id")
    private String productId;

    @ApiModelProperty("视频")
    @TableField("video_url")
    private String videoUrl;

    @ApiModelProperty("图片url")
    @TableField("image_url")
    private String imageUrl;

    @ApiModelProperty("规格数据JSON格式")
    @TableField("spec_attribute")
    private String specAttribute;

    @ApiModelProperty("商品库存")
    @TableField("stock")
    private Integer stock;

    @ApiModelProperty("售价")
    @TableField("sale_price")
    private BigDecimal salePrice;

    @ApiModelProperty(value = "拼团价")
    @TableField("team_price")
    private BigDecimal teamPrice;

    @ApiModelProperty("划线价/原价")
    @TableField("cross_price")
    private BigDecimal crossPrice;

    @ApiModelProperty("创建时间")
      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("修改时间")
      @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private HashMap<String,String> specAttributeMap;
}
